package com.dsunsoft.rtu.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 心跳包信息
 */
@Data
public class HeartbeatInfo implements Serializable {
    private static final long serialVersionUID = -4245132058054984883L;

    /**
     * 设备ID
     */
    private Integer deviceId;
    /**
     * 最后上报日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastReportDate;

    public HeartbeatInfo() {
    }

    public HeartbeatInfo(Integer deviceId, Date lastReportDate) {
        this.deviceId = deviceId;
        this.lastReportDate = lastReportDate;
    }
}
